<?php if(isset($news) && count($news) > 0):?>
<ul class="b_li_main_a">
    <?php 
        foreach($news as $new):
            $uri = get_base_url() . url_title(trim($new->category), 'dash', TRUE) . '/' . url_title(trim($new->title), 'dash', TRUE) . '-n' . $new->cat_id . '-' . $new->id;
            $thumbnail = ($new->thumbnail != '') ? $new->thumbnail : '/images/noimage.jpg';
    ?>
    <li class="b_li_main">
        <div class="img_main">
            <a href="<?php echo $uri;?>"><img src="<?php echo str_replace('/thumbnails', '', $thumbnail);?>" alt="<?php echo $new->title;?>" title="<?php echo $new->title;?>">
                <span></span></a>
        </div>
        <div class="detail_main">
            <h3 class="detail_main_h"><a href="<?php echo $uri;?>"><?php echo $new->title;?></a></h3>
            <p class="detail_main_p">
                <?php echo shorten_str($new->summary, MAXLENGHT_HP_NEWS_DESCRIPTION);?>
            </p>
            <a href="<?php echo $uri;?>" class="more"><?php echo __('IP_detail');?></a>
        </div>
    </li>
    <?php endforeach;?>
</ul>
<?endif;?>